// 上移
export function moveUp(arr, index) {
  if (index > 0) {
    const temp = arr[index];
    arr[index] = arr[index - 1];
    arr[index - 1] = temp;
  }
}

// 下移
export function moveDown(arr, index) {
  if (index < arr.length - 1) {
    const temp = arr[index];
    arr[index] = arr[index + 1];
    arr[index + 1] = temp;
  }
}
